From: Keir Fraser Date: Wed, 23 Jul 2008 08:59:21 +0000 (+0100) Subject: vtd: no need to flush iotlb or write buffer in iommu_page_mapping(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14165^2~140 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=9cd4e059aee08dfa0d853a5a0e8471bf49b8b752;p=xen.git vtd: no need to flush iotlb or write buffer in iommu_page_mapping(). Signed-off-by: Weidong Han --- diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 3a11f5f007..1090cee821 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1523,9 +1523,6 @@ int intel_iommu_unmap_page(struct domain *d, unsigned long gfn) int iommu_page_mapping(struct domain *domain, paddr_t iova, paddr_t hpa, size_t size, int prot) { - struct hvm_iommu *hd = domain_hvm_iommu(domain); - struct acpi_drhd_unit *drhd; - struct iommu *iommu; u64 start_pfn, end_pfn; struct dma_pte *page = NULL, *pte = NULL; int index; @@ -1553,18 +1550,6 @@ int iommu_page_mapping(struct domain *domain, paddr_t iova, index++; } - for_each_drhd_unit ( drhd ) - { - iommu = drhd->iommu; - - if ( !test_bit(iommu->index, &hd->iommu_bitmap) ) - continue; - - if ( iommu_flush_iotlb_psi(iommu, domain_iommu_domid(domain), - iova, index, 1) ) - iommu_flush_write_buffer(iommu); - } - return 0; } @@ -1803,11 +1788,9 @@ int intel_iommu_assign_device(struct domain *d, u8 bus, u8 devfn) ret = iommu_prepare_rmrr_dev(d, rmrr, bus, devfn); if ( ret ) - { gdprintk(XENLOG_ERR VTDPREFIX, "IOMMU: mapping reserved region failed\n"); - return ret; - } + return ret; } }